3.297 \(\int \sec ^4(e+f x) (a+b \sin ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=45 \[ \frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+b^2 x \]

[Out]

b^2*x + ((a^2 - b^2)*Tan[e + f*x])/f + ((a + b)^2*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.062085, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3191, 390, 203} \[ \frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+b^2 x \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(a + b*Sin[e + f*x]^2)^2,x]

[Out]

b^2*x + ((a^2 - b^2)*Tan[e + f*x])/f + ((a + b)^2*Tan[e + f*x]^3)/(3*f)

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \sec ^4(e+f x) \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+(a+b) x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-b^2+(a+b)^2 x^2+\frac{b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+\frac{b^2 \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=b^2 x+\frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.324862, size = 57, normalized size = 1.27 \[ \frac{(a+b) \tan (e+f x) \sec ^2(e+f x) ((a-2 b) \cos (2 (e+f x))+2 a-b)+3 b^2 (e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^4*(a + b*Sin[e + f*x]^2)^2,x]

[Out]

(3*b^2*(e + f*x) + (a + b)*(2*a - b + (a - 2*b)*Cos[2*(e + f*x)])*Sec[e + f*x]^2*Tan[e + f*x])/(3*f)

________________________________________________________________________________________

Maple [A]  time = 0.072, size = 76, normalized size = 1.7 \begin{align*}{\frac{1}{f} \left ( -{a}^{2} \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \tan \left ( fx+e \right ) +{\frac{2\,ab \left ( \sin \left ( fx+e \right ) \right ) ^{3}}{3\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+{b}^{2} \left ({\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}-\tan \left ( fx+e \right ) +fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(a+b*sin(f*x+e)^2)^2,x)

[Out]

1/f*(-a^2*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e)+2/3*a*b*sin(f*x+e)^3/cos(f*x+e)^3+b^2*(1/3*tan(f*x+e)^3-tan(f*x+e
)+f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.47153, size = 72, normalized size = 1.6 \begin{align*} \frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \,{\left (f x + e\right )} b^{2} + 3 \,{\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sin(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/3*((a^2 + 2*a*b + b^2)*tan(f*x + e)^3 + 3*(f*x + e)*b^2 + 3*(a^2 - b^2)*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.972, size = 169, normalized size = 3.76 \begin{align*} \frac{3 \, b^{2} f x \cos \left (f x + e\right )^{3} +{\left (2 \,{\left (a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sin(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/3*(3*b^2*f*x*cos(f*x + e)^3 + (2*(a^2 - a*b - 2*b^2)*cos(f*x + e)^2 + a^2 + 2*a*b + b^2)*sin(f*x + e))/(f*co
s(f*x + e)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(a+b*sin(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.14529, size = 108, normalized size = 2.4 \begin{align*} \frac{a^{2} \tan \left (f x + e\right )^{3} + 2 \, a b \tan \left (f x + e\right )^{3} + b^{2} \tan \left (f x + e\right )^{3} + 3 \,{\left (f x + e\right )} b^{2} + 3 \, a^{2} \tan \left (f x + e\right ) - 3 \, b^{2} \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*sin(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/3*(a^2*tan(f*x + e)^3 + 2*a*b*tan(f*x + e)^3 + b^2*tan(f*x + e)^3 + 3*(f*x + e)*b^2 + 3*a^2*tan(f*x + e) - 3
*b^2*tan(f*x + e))/f